﻿<%@ Control Language="C#" AutoEventWireup="true" CodeFile="ucSuppliers.ascx.cs" Inherits="Admin_ucControl_ucSuppliers" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit.HTMLEditor"
    TagPrefix="cc1" %>
<h1>
    Danh Sách Nhà Cung Cấp</h1>
<br />
<div>
    <asp:HyperLink ID="hyp" runat="server" NavigateUrl="~/Admin/DanhSachSanPham.aspx" Font-Size="Medium">Quay lại</asp:HyperLink>
</div>
<br />
<asp:Panel ID="Panel1" runat="server">
    <table class="style2">
        <tr>
            <td valign="top" style="width: 50%; float: left">
                <table style="width: 100%">
                    <tr>
                        <th style="width: 100px">
                            &nbsp;Nhà Cung Cấp
                        </th>
                        <td>
                            <asp:TextBox ID="txtnhacc" runat="server" CssClass="inp-form"></asp:TextBox>
                            &nbsp;<asp:RequiredFieldValidator ID="reqCatename" runat="server" ControlToValidate="txtnhacc"
                                Text="*" Font-Bold="True" ForeColor="Red" ValidationGroup="save"></asp:RequiredFieldValidator><asp:Label
                                    ID="lb_message" runat="server" ForeColor="Red"></asp:Label>
                        </td>
                    </tr>
                    <tr>
                        <th>
                            Giới thiệu
                        </th>
                        <td>
                            <%--<cc1:Editor ID="txtDescription" runat="server" />--%>
                            <cc1:Editor ID="txtgioithieu" runat="server" />
                        </td>
                    </tr>
                    <tr>
                        <td>
                            Image URL
                        </td>
                        <td>
                            <asp:FileUpload ID="upImage" runat="server" />
                            <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" 
                                ControlToValidate="upImage" ErrorMessage="*" ValidationGroup="save"></asp:RequiredFieldValidator>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            &nbsp;
                        </td>
                        <td>
                            <asp:Button ID="btAdd" runat="server" Text="Save" OnClick="btAdd_Click" ValidationGroup="save" />
                        </td>
                    </tr>
                </table>
            </td>
            <td valign="top" style="float: right; padding-left: 20px">
                <asp:GridView ID="grdMenuParent" runat="server" CellPadding="3" AutoGenerateColumns="False"
                    AllowPaging="True" BackColor="White" BorderColor="#CCCCCC" BorderStyle="None"
                    BorderWidth="1px" ShowFooter="True" Width="550px" PageSize="4" 
                    onpageindexchanging="grdMenuParent_PageIndexChanging">
                    <RowStyle ForeColor="#000066" />
                    <FooterStyle BackColor="White" ForeColor="#000066" />
                    <PagerStyle BackColor="White" ForeColor="#000066" HorizontalAlign="Left" />
                    <SelectedRowStyle BackColor="#669999" Font-Bold="True" ForeColor="White" />
                    <HeaderStyle BackColor="#006699" Font-Bold="True" ForeColor="White" Height="35px" />
                    <Columns>
                        <asp:TemplateField HeaderText="STT">
                            <ControlStyle Height="22px" />
                            <ItemStyle HorizontalAlign="Center" Width="30px" />
                            <ItemTemplate>
                                <asp:Label ID="STT" runat="server" Text="<%# ((grdMenuParent.PageIndex * grdMenuParent.PageSize) + grdMenuParent.Rows.Count + 1)%>"></asp:Label></ItemTemplate>
                        </asp:TemplateField>
                        <asp:HyperLinkField DataTextField="Suppliers" DataNavigateUrlFormatString="~/Admin/NhaCungCap.aspx?id={0}"
                            HeaderText="Tên nhà cung cấp" SortExpression="Suppliers" DataNavigateUrlFields="IDSupplie">
                            <ItemStyle Width="150px" HorizontalAlign="Center" />
                        </asp:HyperLinkField>
                        <asp:ImageField DataImageUrlField="ImageURL" DataImageUrlFormatString="~/Admin/images/Items/{0}"
                            HeaderText="Hình ảnh" HeaderStyle-HorizontalAlign="Center">
                            <ControlStyle Height="80px" Width="100px" />
                            <ItemStyle HorizontalAlign="Center" />
                        </asp:ImageField>
                    </Columns>
                </asp:GridView>
            </td>
        </tr>
    </table>
</asp:Panel>
